package com.helwen.restaurantbooking.datalayer.entities;

// Generated Jul 26, 2013 12:03:22 AM by Hibernate Tools 3.4.0.CR1
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TblBooking generated by hbm2java
 */
@Entity
@Table(name = "tbl_booking", catalog = "restaurantbooking")
public class TblBooking implements java.io.Serializable {

    private Integer id;
    private TblTable tblTable;
    private String customerName;
    private String contactNumber;
    private Date reservationTime;
    private String duration;
    private int numberInParty;
    private String remark;
    private Boolean status;

    public TblBooking() {
    }

    public TblBooking(TblTable tblTable, Date reservationTime, int numberInParty) {
        this.tblTable = tblTable;
        this.reservationTime = reservationTime;
        this.numberInParty = numberInParty;
    }

    public TblBooking(TblTable tblTable, String customerName,
            String contactNumber, Date reservationTime, String duration,
            int numberInParty, String remark, Boolean status) {
        this.tblTable = tblTable;
        this.customerName = customerName;
        this.contactNumber = contactNumber;
        this.reservationTime = reservationTime;
        this.duration = duration;
        this.numberInParty = numberInParty;
        this.remark = remark;
        this.status = status;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "table_number", nullable = false)
    public TblTable getTblTable() {
        return this.tblTable;
    }

    public void setTblTable(TblTable tblTable) {
        this.tblTable = tblTable;
    }

    @Column(name = "customer_name", length = 45)
    public String getCustomerName() {
        return this.customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    @Column(name = "contact_number", length = 45)
    public String getContactNumber() {
        return this.contactNumber;
    }

    public void setContactNumber(String contactNumber) {
        this.contactNumber = contactNumber;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "reservation_time", nullable = false, length = 19)
    public Date getReservationTime() {
        return this.reservationTime;
    }

    public void setReservationTime(Date reservationTime) {
        this.reservationTime = reservationTime;
    }

    @Column(name = "duration", length = 45)
    public String getDuration() {
        return this.duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    @Column(name = "number_in_party", nullable = false)
    public int getNumberInParty() {
        return this.numberInParty;
    }

    public void setNumberInParty(int numberInParty) {
        this.numberInParty = numberInParty;
    }

    @Column(name = "remark", length = 100)
    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Column(name = "status")
    public Boolean getStatus() {
        return this.status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }
}
